package com.svconnect.exceptions;

import java.io.File;

public class BindingNotFoundException extends RuntimeException {

	private static final long serialVersionUID = 1L;
	
	private String contractName;
	private File configFile;

	public BindingNotFoundException(String contractName, File configFile) {
		super();
		this.contractName = contractName;
		this.configFile = configFile;
	}
	
	public BindingNotFoundException(String msg) {
		super(msg);
	}
	
	public File getConfigFile() {
		return configFile;
	}

	public void setConfigFile(File configFile) {
		this.configFile = configFile;
	}
	
	public String getContractName() {
		return contractName;
	}

	public void setContractName(String contractName) {
		this.contractName = contractName;
	}
	
	
	public String getMessage() {
		String fileName = configFile!=null ? configFile.getAbsolutePath() : "unknown file";
		return String.format("Binding '%s' not found! (%s)", contractName, fileName);
	}
	
}
